<!DOCTYPE html>
<html lang="zh" dir="ltr" class="client-nojs">
<head>
<title>C 语言</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../common/favicon.ico">
<link rel="stylesheet" href="../../common/ext.css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" href="../../common/site_modules.css">
<style>a:lang(ar),a:lang(ckb),a:lang(fa),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}#toc{display:none}.editsection{display:none}
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-css:7:15cea3ec788a65b5187d4018eed543bf */</style>

<script src="../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"c/language","wgTitle":"c/language","wgCurRevisionId":73175,"wgArticleId":1062,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":false,"wgPageContentLanguage":"zh","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"zh","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgMonthNamesShort":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRelevantPageName":"c/language","wgUserVariant":"zh","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"zh","language":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-MathJax":1,"gadget-ColiruCompiler":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_zh_:resourceloader:filter:minify-js:7:258d7cd6aa9aa67dee25e01fb6a9e505 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]--></head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-c_language skin-cppreference2 action-view cpp-navbar">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
<div id="cpp-content-base">
            <div id="content">
                <a id="top"></a>
                <div id="mw-js-message" style="display:none;"></div>
                                <!-- firstHeading -->
<h1 id="firstHeading" class="firstHeading">C 语言</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent">
                                        <!-- tagline -->
                    <div id="siteSub">来自cppreference.com</div>
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <div id="contentSub"><span class="subpages">&lt; <a href="../c.html" title="c">c</a></span></div>
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="zh" dir="ltr" class="mw-content-ltr"><div class="t-navbar" style=""><div class="t-navbar-sep"> </div><div class="t-navbar-head"><a href="../c.html" title="c"> C</a><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em">
<tr class="t-nv"><td colspan="5"> <strong class="selflink">语言</strong> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="header.html" title="c/header">头文件</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="types.html" title="c/types">类型支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="program.html" title="c/program">程序工具</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="variadic.html" title="c/variadic">变参数函数支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="memory.html" title="c/memory">动态内存管理</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="error.html" title="c/error">错误处理</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="chrono.html" title="c/chrono">日期和时间工具</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="string.html" title="c/string">字符串库</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="algorithm.html" title="c/algorithm">算法</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="numeric.html" title="c/numeric">数值</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="io.html" title="c/io">输入/输出支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="locale.html" title="c/locale">本地化支持</a> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="thread.html" title="c/thread">线程支持</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="atomic.html" title="c/atomic">原子操作</a> <span class="t-mark-rev t-since-c11">(C11)</span> </td></tr>
<tr class="t-nv"><td colspan="5"> <a href="experimental.html" title="c/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div><div class="t-navbar-head"><strong class="selflink">C 语言</strong><div class="t-navbar-menu"><div><div><table class="t-nv-begin" cellpadding="0" style="line-height:1.1em">
<tr class="t-nv-h2"><td colspan="5"> <a href="language/basic_concepts.html" title="c/language/basic concepts">基本概念</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="keyword.html" title="c/keyword">关键词</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="preprocessor.html" title="c/preprocessor">预处理器</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/statements.html" title="c/language/statements">语句</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/expressions.html" title="c/language/expressions">表达式</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/initialization.html" title="c/language/initialization">初始化</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/declarations.html" title="c/language/declarations">声明</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/functions.html" title="c/language/functions">函数</a></td></tr>
<tr class="t-nv"><td colspan="5"> 杂项</td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="language/history.html" title="c/language/history">C 的历史</a></td></tr>
<tr class="t-nv-h2"><td colspan="5"> <a href="experimental.html" title="c/experimental">技术规范</a> </td></tr>
</table></div><div></div></div></div></div><div class="t-navbar-sep"> </div></div>
<p>这是一份关于核心 C 语言构造的参考。
</p>
<table cellpadding="5">

<tr valign="top">
<td>
<p><b><a href="language/basic_concepts.html" title="c/language/basic concepts">基本概念</a></b>
</p>
<div class="mainpagediv">
<p><a href="comment.html" title="c/comment">注释</a><br>
<a href="language/ascii.html" title="c/language/ascii">ASCII 码表</a> -
<a href="language/escape.html" title="c/language/escape">转义序列</a><br>
<a href="language/translation_phases.html" title="c/language/translation phases">翻译阶段</a><br>
<a href="language/punctuators.html" title="c/language/punctuators"> 标点</a><br>
<a href="language/identifier.html" title="c/language/identifier">标识符</a> -
<a href="language/scope.html" title="c/language/scope">作用域</a> -
<a href="language/lifetime.html" title="c/language/lifetime">生存期</a><br>
<a href="language/name_space.html" title="c/language/name space">查找与命名空间</a><br>
<a href="language/type.html" title="c/language/type" class="mw-redirect">类型</a> - 
<a href="language/arithmetic_types.html" title="c/language/arithmetic types">算术类型</a><br>
<a href="language/object.html" title="c/language/object">对象与对齐</a> <br>
<a href="language/main_function.html" title="c/language/main function"><code>main</code> 函数</a><br>
<a href="https://zh.cppreference.com/mwiki/index.php?title=c/language/as_if&amp;action=edit&amp;redlink=1" class="new" title="c/language/as if（页面不存在）">如同规则</a><br>
<a href="language/behavior.html" title="c/language/behavior">未定义行为</a><br>
<a href="language/memory_model.html" title="c/language/memory model">内存模型与数据竞争</a><br>
</p>
</div>
<p><b><a href="keyword.html" title="c/keyword">关键词</a></b>
</p>
<div class="mainpagediv">
</div>
<p><b><a href="preprocessor.html" title="c/preprocessor">预处理器</a></b>
</p>
<div class="mainpagediv">
<p><a href="preprocessor/conditional.html" title="c/preprocessor/conditional"> <code>#if</code> - <code>#ifdef</code> - <code>#ifndef</code> - <code>#elif</code></a><br>
<a href="preprocessor/conditional.html" title="c/preprocessor/conditional"> <code>#elifdef</code> - <code>#elifndef</code></a><span class="t-mark-rev t-since-c23">(C23)</span><br>
<a href="preprocessor/replace.html" title="c/preprocessor/replace"> <code>#define</code> - <code>#</code> - <code>##</code></a><br> 
<a href="preprocessor/include.html" title="c/preprocessor/include"><code>#include</code></a> -
<a href="preprocessor/impl.html" title="c/preprocessor/impl"><code>#pragma</code></a><br>
<a href="preprocessor/line.html" title="c/preprocessor/line"><code>#line</code></a> -
<a href="preprocessor/error.html" title="c/preprocessor/error"><code>#error</code></a><br>
</p>
</div>
<p><b><a href="language/statements.html" title="c/language/statements">语句</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/if.html" title="c/language/if"><code>if</code></a> -
<a href="language/switch.html" title="c/language/switch"><code>switch</code></a><br>
<a href="language/for.html" title="c/language/for"><code>for</code></a><br>
<a href="language/while.html" title="c/language/while"><code>while</code></a> - <a href="language/do.html" title="c/language/do"> <code>do</code>-<code>while</code></a><br>
<a href="language/continue.html" title="c/language/continue"><code>continue</code></a> -
<a href="language/break.html" title="c/language/break"><code>break</code></a><br>
<a href="language/goto.html" title="c/language/goto"><code>goto</code></a> -
<a href="language/return.html" title="c/language/return"><code>return</code></a><br>
</p>
</div>
</td>
<td>
<p><b><a href="language/expressions.html" title="c/language/expressions">表达式</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/value_category.html" title="c/language/value category">值类别</a><br> 
<a href="language/eval_order.html" title="c/language/eval order">求值顺序与定序</a><br> 
<a href="language/expressions.html#.E5.B8.B8.E9.87.8F.E5.8F.8A.E5.AD.97.E9.9D.A2.E9.87.8F" title="c/language/expressions">常量及字面量</a><br>
 <a href="language/integer_constant.html" title="c/language/integer constant">整数常量</a><br>
 <a href="language/floating_constant.html" title="c/language/floating constant">浮点常量</a><br>
 <a href="language/character_constant.html" title="c/language/character constant">字符常量</a><br>
 <a href="language/string_literal.html" title="c/language/string literal">字符串字面量</a><br>
 <a href="language/compound_literal.html" title="c/language/compound literal">复合字面量</a><span class="t-mark-rev t-since-c99">(C99)</span><br>
<a href="language/constant_expression.html" title="c/language/constant expression">常量表达式</a><br>
<a href="language/conversion.html" title="c/language/conversion"> 隐式转换</a> <br>
<a href="language/expressions.html#.E8.BF.90.E7.AE.97.E7.AC.A6" title="c/language/expressions">运算符</a><br>
 <a href="language/operator_member_access.html" title="c/language/operator member access">成员访问与间接</a><br>
 <a href="language/operator_logical.html" title="c/language/operator logical">逻辑</a> -
<a href="language/operator_comparison.html" title="c/language/operator comparison">比较</a><br>
 <a href="language/operator_arithmetic.html" title="c/language/operator arithmetic">算术</a> -
<a href="language/operator_assignment.html" title="c/language/operator assignment">赋值</a><br>
 <a href="language/operator_incdec.html" title="c/language/operator incdec">自增减</a><br>
 <a href="language/operator_other.html" title="c/language/operator other">调用、逗号、三元</a><br>
 <a href="language/sizeof.html" title="c/language/sizeof"><code>sizeof</code></a> -
<a href="language/_Alignof.html" title="c/language/ Alignof"><code>_Alignof</code></a><span class="t-mark-rev t-since-c11">(C11)</span><br>
 <a href="language/cast.html" title="c/language/cast">转型运算符</a><br>
<a href="language/operator_precedence.html" title="c/language/operator precedence">运算符优先级</a><br>
<a href="language/generic.html" title="c/language/generic">泛型选择</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
</p>
</div>
<p><b><a href="language/initialization.html" title="c/language/initialization">初始化</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/scalar_initialization.html" title="c/language/scalar initialization">标量</a><br>
<a href="language/array_initialization.html" title="c/language/array initialization">数组</a><br>
<a href="language/struct_initialization.html" title="c/language/struct initialization">结构体/联合体</a><br>
</p>
</div>
</td>
<td>
<p><b><a href="language/declarations.html" title="c/language/declarations">声明</a></b> 
</p>
<div class="mainpagediv">
<p><a href="language/pointer.html" title="c/language/pointer">指针</a> -
<a href="language/array.html" title="c/language/array">数组</a><br>
<a href="language/enum.html" title="c/language/enum">枚举</a><br>
<a href="language/storage_duration.html" title="c/language/storage duration">存储期与链接</a><br>
<a href="language/const.html" title="c/language/const"><code>const</code></a> - <a href="language/volatile.html" title="c/language/volatile"><code>volatile</code></a> - <a href="language/restrict.html" title="c/language/restrict"><code>restrict</code></a><span class="t-mark-rev t-since-c99">(C99)</span><br>
<a href="language/struct.html" title="c/language/struct"><code>struct</code></a> - <a href="language/union.html" title="c/language/union"><code>union</code></a> -
<a href="language/bit_field.html" title="c/language/bit field">位域</a><br>
<a href="language/_Alignas.html" title="c/language/ Alignas"><code>_Alignas</code></a><span class="t-mark-rev t-since-c11">(C11)</span> -
<a href="language/typedef.html" title="c/language/typedef"><code>typedef</code></a><br>
<a href="language/_Static_assert.html" title="c/language/ Static assert"><code>_Static_assert</code></a><span class="t-mark-rev t-since-c11">(C11)</span><br>
<a href="language/atomic.html" title="c/language/atomic">原子类型</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
<a href="language/extern.html" title="c/language/extern">外部及试探性定义</a><br>
<a href="language/attributes.html" title="c/language/attributes"> 属性</a><span class="t-mark-rev t-since-c23">(C23)</span><br>
</p>
</div>
<p><b><a href="language/functions.html" title="c/language/functions">函数</a></b>
</p>
<div class="mainpagediv">
<p><a href="language/function_declaration.html" title="c/language/function declaration">函数声明</a><br>
<a href="language/function_definition.html" title="c/language/function definition">函数定义</a><br>
<a href="language/inline.html" title="c/language/inline"><code>inline</code></a><span class="t-mark-rev t-since-c99">(C99)</span> - <a href="language/_Noreturn.html" title="c/language/ Noreturn"><code>_Noreturn</code></a><span class="t-mark-rev t-since-c11">(C11)</span><br>
<a href="language/variadic.html" title="c/language/variadic">可变参数</a><br>
</p>
</div>
<p><b>杂项</b>
</p>
<div class="mainpagediv">
<p><a href="language/history.html" title="c/language/history">C 的历史</a><br>
<a href="language/conformance.html" title="c/language/conformance">一致性</a><br>
<a href="language/asm.html" title="c/language/asm">内联汇编</a><br>
<a href="https://zh.cppreference.com/mwiki/index.php?title=c/language/signal&amp;action=edit&amp;redlink=1" class="new" title="c/language/signal（页面不存在）">信号处理</a> <br>
<a href="language/analyzability.html" title="c/language/analyzability">可分析性</a><span class="t-mark-rev t-since-c11">(C11)</span><br>
</p>
<br></div>
<p><br>
</p>
</td></tr></table>
<h3><span class="mw-headline" id=".E5.8F.82.E9.98.85">参阅</span></h3>
<table class="t-dsc-begin">

</table>

<!-- 
NewPP limit report
Preprocessor visited node count: 2335/1000000
Preprocessor generated node count: 5257/1000000
Post‐expand include size: 28700/2097152 bytes
Template argument size: 6118/2097152 bytes
Highest expansion depth: 13/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_zh_:pcache:idhash:1062-0!*!0!*!*!*!zh!* and timestamp 20211216084439 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div class="printfooter">
                    来自“<a href="https://zh.cppreference.com/mwiki/index.php?title=c/language&amp;oldid=73175">https://zh.cppreference.com/mwiki/index.php?title=c/language&amp;oldid=73175</a>”                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div class="visualClear"></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <div id="cpp-footer-base" class="noprint">
            <div id="footer">
                        <div id="cpp-navigation">
            <h5>导航</h5>
            <ul><li><a href="https://zh.cppreference.com/w/c/language">Online version</a></li><li>Offline version retrieved 2022-01-01 00:37.</li></ul></div>
                        <ul id="footer-info">
                                    <li id="footer-info-lastmod"> 本页面最后修改于2021年12月8日 (星期三) 18:33。</li>
                                    <li id="footer-info-viewcount">此页面已被浏览过71,292次。</li>
                            </ul>
                    </div>
        </div>
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.MathJax","ext.gadget.ColiruCompiler"], null, true);
}</script>
<script src="../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 0.376 secs. -->
	</body>
<!-- Cached 20211216084440 -->
</html>